package com.jy.user.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Set;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jy.user.dao.UserDAO;
import com.jy.user.entity.User;
import com.jy.user.service.UserService;

@Service
public class UserServiceImpl implements UserService {
	
	@Autowired
	private UserDAO userDAO;
	
	public List<HashMap<String, Object>> findAll() {
		// TODO Auto-generated method stub
		return userDAO.findAll();
	}
	
	public User getByUsername(String username) {
        return userDAO.getByUsername(username);
    }

    public Set<String> getRoles(String username) {
        return userDAO.getRoles(username);
    }

    public Set<String> getPermissions(String username) {
        return userDAO.getPermissions(username);
    }

}
